﻿<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>案例展示</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">

<link rel="stylesheet" type="text/css" href="css/styles.css" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/tools.js"></script>
<script type="text/javascript" src="js/script.js"></script>
<script type="text/javascript" src="js/jquery.corner.js"></script>
<script type="text/javascript">
	$(function() {
		$("#upBtn").click(function() {
			if ($("#upBtn").attr("name") < 0) {
				alert("已经是第一页了!");
			} else {
				location.href = "findCaseAction?beginIndex=" + $("#upBtn").attr("name");
			}
		});
		$("#downBtn").click(function() {
			if ($("#downBtn").attr("name") >= ($("#maxPage").val())) {
				alert("已经是最后页了!");
			} else {
				location.href = "findCaseAction?beginIndex=" + $("#downBtn").attr("name");
			}
		});
	});
</script>

<style type="text/css">
#blogDiv:hover {
	background-color: #EEE;
}
</style>
</head>
<body>
	<div align="center" style="height: 220px;">
		<div id="top" style="width:950px;">
			<img src="images/logo.jpg" width="950" height="150" border="0" />
			<p style="font-size: 14px;float: left;">
				您当前的位置:&nbsp;&nbsp;<a href="findProductAction">首页</a>&nbsp;&nbsp;>>&nbsp;&nbsp;案例展示&nbsp;&nbsp;
			</p>
			<div style="width: 110px;float: right;">
				<p ><a href="sendBlog.jsp" style="float: right;position: relative;top:2px;width:80px;height:20px; border: 1px solid skyblue;left: -4px;top:-6px;">发表</a></p>
			</div>
		</div>
	</div>
	<div align="center">
		<s:if test="lc!=null">
			<s:iterator value="lc">

				<div style="width:600px;height:200px;padding: 4px 4px 4px 4px;" id="blogDiv">
					<img src="images/user.png" width="64px" height="64px" style="float: left;" />
						<div style="width: 440px;float: left;">
							<span style="font-family:'Arial Negreta', 'Arial';font-weight:700;color:red;float: left;">
							<s:property value="userName" />
						</span>
						<span style="font-family:'Arial Negreta', 'Arial';color:#797979;float: left;">：</span>
						<span style="font-family:'Arial Normal', 'Arial'; font-size: 14px;float: left;">分享</span>
						<span style="font-family:'Arial Negreta', 'Arial';font-weight:700;color:#333333;float: left;">
							《<a href="showAllContentBlogAction?caseId=<s:property value='caseId'/>">
								<s:property value="caseTitle" />
							 </a>》
						 </span> &nbsp;&nbsp;&nbsp;&nbsp;
						 <span style="font-size: 14px;color: #666;float: right;">
						 	发表日期:<s:property value="caseDate" />
						 </span>
						</div>
						 <s:if test="#session.ui!=null">
						 	<div style="float: right;" align="right">
						 		<a href="delCaseAction?caseId=<s:property value='caseId'/>" style="float: right;position: relative;top:-4px;width:80px;height:20px; border: 1px solid skyblue;left: -4px;">删除</a>
						 	</div>
						 </s:if>
					<br />
					<p style="font-size: 16px;font-family: SimHei;" align="left">
						&nbsp;&nbsp;&nbsp;&nbsp;
						<s:property value="caseContent" />
					</p>
				</div>
				<hr width="590px" color="#CCCCCC">
			</s:iterator>
			<div style="float: left;width:100%;" align="center">
				<div style="width:200px;" align="center">
					<a id="upBtn" name="<s:property value='beginIndex-4'/>" style="position:absolute; width:100px;height:20px; border: 1px solid #666;">◀上一页</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					<a id="downBtn" name="<s:property value='beginIndex+4'/>" style="position:absolute; width:100px;height:20px; border: 1px solid #666;">下一页▶</a>
					<input type="hidden" id="maxPage" value="<s:property value='maxPage'/>" />
				</div>
			</div>
		</s:if>
	</div>

	<hr width="100%" style="color:#ccc;float: left;position: relative;top:20px;" />
	<br />
	<div align="center" style="width: 100%;float: left;position: relative;top: 20px;">
		<a href="#" style="text-decoration:none;color:#666;font-size: 14px;">联系我们</a>&nbsp;&nbsp;|&nbsp;&nbsp;
		<a href="#" style="text-decoration:none;color:#666;font-size: 14px;">加入我们</a>&nbsp;&nbsp;|&nbsp;&nbsp;
		<s:if test="#session.ui!=null">
			<a href="exitAction"
				style="text-decoration:none;color:#666;font-size: 14px;">【退出】</a>
		</s:if>
		<s:else>
			<a href="javascript:showBox('登录','login()')"
				style="text-decoration:none;color:#666;font-size: 14px;">管理员入口</a>
		</s:else>
		<br /> <br /> <br />
	</div>
</body>
</html>